package com.lbd.system.controller;

import com.lbd.base.controller.BaseController;
import com.lbd.commons.Result;
import com.lbd.commons.ResultState;
import com.lbd.system.bean.EventLog;
import com.lbd.system.bean.User;
import com.lbd.system.service.EventLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by WangYajie on 2016/9/14.
 */
@RestController
@RequestMapping("/event")
public class EventController extends BaseController {

    @Autowired
    EventLogService eventLogService;

    @RequestMapping(value = "/list", method = RequestMethod.GET)
    public Result list(int page, int rows, EventLog event) {
        return new Result(ResultState.SUCCESS, "查询成功", eventLogService.findByPageConditionJpql(page, rows, event));
    }
}
